NoSQL operator: prtable

Very experimental NoSQL table formatter for character displays.

Usage: prtable [options]

Options:
    --help (-h)
      Print this help info.

    --trunc (-T) 'n'
      Truncate field length to 'n'. The default is no truncation.
      Truncation will affect automatic datatype detection (see below).

    --debug (-x) 'c'
      Print to STDERR about automatic datatype detection on column 'c'.
      If 'c' is not specified then no debug will occur.

    --step (-S) 'N'
      Internally, the program comprises three steps. With this option
      we tell it to perform just the first 'N' steps, with N={1,2,3}

    --best=0 (-b0)
      By default, when a multi-line record of output for each row is
      necessary (due to the width of the current window or terminal)
      the program will try to fill space at the end of lines that would
      otherwise be wasted by moving some columns. This option prevents
      the moving of any columns.

    --best=N (-b[N])
      This option attempts a "best fit" by rearranging columns (widest
      columns first). If 'N' is given, the first N columns of the first
      line will not be moved.

    --big-fields (-B)
      Handle very large data fields, e.g. over 1000 chars.
      This option takes longer but it works for any size data fields.

    --fold (-f)
      Fold long data fields into multi line data based on field width.
      May be used with the '--trunc' option to limit the field width.
      Only a single line record of output is produced with this option.

    --indent=N (-iN)
      Indent size of N spaces on 2nd and later lines of a multi-line
      record of output. Default is 4 spaces.

    --line-width=N (-lN)
      Line length of N chars for output. Default is the width of
      the current window or terminal.

    --page-size=N (-pN)
      Page size is N lines. Default is the height of the current
      window or terminal.  A value of zero '-p0' will turn paging off.

    --print=X[stg] (-PX[stg])
      Page headings and settings for printing.  A two line heading is
      put onto each page: page number, current date, and an optional
      string (stg).  Sets page length (in lines) and line length (in
      chars) according to the value of 'X' as follows.
         X: P  page: 60  line:   80     (default font size)
         X: R  page: 47  line:  116     (rotated default)
         X: A  page: 51  line:  125     (rotated 10 point font)
         X: 8  page: 63  line:  144     (rotated  8 point font)
         X: 6  page: 82  line:  192     (rotated  6 point font)
         X: W  page: and line: from current window size.
      Other desired page and/or line size options may be set after
      this in the option list.

    --separator=K (-sK)
      Separator 'K' (which may be multi char) is placed between columns.
      Default is two spaces.

    --trunc=[N] (-t[N])
      Truncate data to the defined width. If N is given, the width
      of each printed field will be limited to N chars.

    --window (-w)
      List as many columns as possible in single line records that
      will fit in the current window or terminal width.

Notes:

This program is rather inefficient and it is mainly meant to be used
interactively in a terminal session.

Before running this program you should make sure that the environment
variables LINES and COLUMNS correctly reflect your current terminal
size. In Linux, with a Bourne shell, this command will do the job:

	     set `stty size`; export LINES=$1 COLUMNS=$2

On other UNIX systems you may have to adapt it to the actual output
format produced by your "stty" utility.

Automatic data-type detection:

Column types/widths are inferred from the input table in an auto-
adaptive manner. Some examples of how datatypes are detected:

Value                 Type
-----                 ----
zxZZ123               String
12345                 Integer
-12345                Integer
+12345                Integer
1234,5                Float1
1234.5                Float1
-1234.5               Float1
+1234.567             Float3
0.56                  Float2
.56                   Float2


If input columns contain fields that are made only by hyphens (-), or
only by equal signs (=), those fields are considered to be formatting
artifacts; they are expanded to fit the field width, and do not affect
the datatype auto-detection mechanism described above. Such lines can
be inserted, for instance, as the result of "total -r".
Back